import 'package:http/http.dart' as http;

Future<http.StreamedResponse> sendRequest(String url, String imagePath) async {
  var request = http.MultipartRequest('POST', Uri.parse('https://cbec-studapi.gzport.net/api/index/upload'));

  request.fields['app_key'] = '你的app_key';
  request.fields['timestamp'] = '你的timestamp';
  request.fields['v'] = '你的版本号';
  request.fields['sign_method'] = 'md5';
  request.fields['sign'] = '123456';

  request.files.add(await http.MultipartFile.fromPath(
    'file',
    imagePath,
  ));

  var response = await request.send();

  return response;
}